package com.company.project.upm.entity.user;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author yuzhongbo
 * @since 2021-12-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_user")
@ApiModel(value="User对象", description="用户表")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "登录账号")
    @TableField("login_code")
    private String loginCode;

    @ApiModelProperty(value = "登录密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "办公电话")
    @TableField("tel")
    private String tel;

    @ApiModelProperty(value = "账号状态code")
    @TableField("acc_state_code")
    private String accStateCode;

    @ApiModelProperty(value = "账号状态name")
    @TableField("acc_state_name")
    private String accStateName;

    @ApiModelProperty(value = "最后登录时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_emp")
    private String createEmp;

    @ApiModelProperty(value = "创建人名称")
    @TableField("create_emp_name")
    private String createEmpName;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人id")
    @TableField("modify_emp")
    private String modifyEmp;

    @ApiModelProperty(value = "修改人名称")
    @TableField("modify_emp_name")
    private String modifyEmpName;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "所属系统")
    @TableField("bt_system")
    private String btSystem;

    @ApiModelProperty(value = "所属用户")
    @TableField("bt_user")
    private String btUser;

    @ApiModelProperty(value = "删除标记")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "设备锁屏密码")
    @TableField("equipment_pw")
    private String equipmentPw;


    public static final String ID = "id";

    public static final String LOGIN_CODE = "login_code";

    public static final String PASSWORD = "password";

    public static final String NAME = "name";

    public static final String EMAIL = "email";

    public static final String PHONE = "phone";

    public static final String TEL = "tel";

    public static final String ACC_STATE_CODE = "acc_state_code";

    public static final String ACC_STATE_NAME = "acc_state_name";

    public static final String LAST_LOGIN_TIME = "last_login_time";

    public static final String REMARK = "remark";

    public static final String CREATE_EMP = "create_emp";

    public static final String CREATE_EMP_NAME = "create_emp_name";

    public static final String CREATE_TIME = "create_time";

    public static final String MODIFY_EMP = "modify_emp";

    public static final String MODIFY_EMP_NAME = "modify_emp_name";

    public static final String MODIFY_TIME = "modify_time";

    public static final String BT_SYSTEM = "bt_system";

    public static final String BT_USER = "bt_user";

    public static final String DEL_FLAG = "del_flag";

    public static final String EQUIPMENT_PW = "equipment_pw";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
